import { USER_LOGIN } from "./mutations-types"
export default {
    state:{
        // 登录的状态
        loginStatus:false,
        // token
        token:null,
        // 用户的信息：头像|昵称
        userInfo:{},
    },
    getters:{},
    mutations:{
        [USER_LOGIN](state,user){
            state.loginStatus = true,
            state.token = user.token,
            state.userInfo = user,
            console.log(state, user);
        }
    },
    actions:{},
}